/// @description 初始化 和 全局变量
// You can write your code in this editor
randomize();
draw_set_font(FONT);
global.gameSaveSlots = 0;
global.gamePaused = false;
global.textSpeed = .75;
global.targetRoom = -1;
global.targetX = -1;
global.targetY = -1;
global.targetDirection = 0;
global.playerHealthMax = 3.0;
global.playerHealth = global.playerHealthMax;
//任务 是个哈希表
global.questStatues = ds_map_create();
global.questStatues[? "TheHatQuest"] = 0;
//钱
global.playerMoney = 100;
//道具
global.playerHasAnyItems = false;
global.playerAmmo = array_create(ITEM.TYPE_COUNT, 0);
global.playerItemUnlocked = array_create(ITEM.TYPE_COUNT, false);
global.playerEquipped = ITEM.NONE;
/*
global.playerHasAnyItems = true;
global.playerItemUnlocked[ITEM.BOMB] = true;
global.playerEquipped = ITEM.BOMB;
global.playerAmmo[ITEM.BOMB] = 0;
global.playerAmmo[ITEM.BOMB] = 5;

global.playerItemUnlocked[ITEM.BOW] = true;
global.playerAmmo[ITEM.BOW] = 0;
global.playerAmmo[ITEM.BOW] = 15;

global.playerItemUnlocked[ITEM.HOOK] = true;
*/
global.iLifted = noone;
global.iCamera = instance_create_layer(0,0,layer,oCamera);
//记录迷宫入口坐标
global.mazeInX = 0;
global.mazeInY = 0;
global.mazeOutX = 0;
global.mazeOutY = 0;

//global.iUI = instance_create_layer(0, 0, layer, oUI);

surface_resize(application_surface, RESOLUTION_W, RESOLUTION_H);

room_goto(ROOM_START);